package com.selfmade.transferutil.app;

import android.app.Application;
import android.content.Context;
import android.util.Log;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.selfmade.transferutil.Transition;
import com.selfmade.transferutil.excel.SelectExcelFile;
import com.selfmade.transferutil.model.Book;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * Created by Selfmade on 2017/7/23/0023.
 */

public class MyApp extends Application {

    public static Context context;
    public static Executor executor;

    public static RequestQueue requestQueue;
    public static Transition transition = null;

    public static List<String> userList;
    public static ArrayList<Book> bookList;

    @Override
    public void onCreate() {
        super.onCreate();
        context = getApplicationContext();
        requestQueue = Volley.newRequestQueue(context);
        executor = Executors.newFixedThreadPool(6);

        userList = new ArrayList<>();
        userList.add(Transition.USER_A);
        userList.add(Transition.USER_B);
        userList.add(Transition.Admin_C);

        bookList = new SelectExcelFile().getBookList();
    }
}
